package com.zsck.zsgy.ui.auth

import androidx.lifecycle.Observer
import com.zsck.zsgy.R
import com.zsck.zsgy.base.BaseActivity
import com.zsck.zsgy.databinding.ActivityAuthLayoutBinding
import com.zsck.zsgy.ui.auth.bean.AuthBean

class AuthActivity : BaseActivity<AuthViewModel, ActivityAuthLayoutBinding>() {

    override fun layoutId(): Int {
        return R.layout.activity_auth_layout
    }

    private var auth: AuthBean? = null

    override fun initData() {
        binding.authViewModel=viewModel
        showDialog()
        viewModel.login("123456","15807990881","15807990881")
        viewModel.loginLiveData.observe(this, Observer {
            dismissDialog()
            auth = it
        })
        viewModel.errorLiveData.observe(this, Observer {
            dismissDialog()
        })
    }



}